""" Redis测试
@Project: Rebar
@File: test.py
@Author: hzc
@Date: 2023/3/22 16:23
"""
from redis import Redis

conn = Redis(host="127.0.0.1", port=6379, db=0, password="Redis@rebar#001")

conn.setex("user", 300, "Jay")
print(conn.ttl("user"))
print(conn.expire("user", 500))
print(conn.ttl("user"))
conn.delete("user")
print(conn.get("user"))
